package com.zxmzy.scaffold.core.base

import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext

/**
 * @author zhangxiaoming
 * @date 2023/8/2
 * @description
 */
abstract class BaseRepository {
    suspend fun <Result> request(block: suspend () -> Result): Result {
        return withContext(Dispatchers.IO) {
            block()
        }
    }
}